Shift responsibility of IDFA collection to clients #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a backport from segmentio/analytics-ios (segmentio/analytics-ios#892).
Any references to Apple's AdSupport framework might trip the App Store's static analysis, making it a bit unclear if SDK users can confidently say that their apps do not use the IDFA. By moving the responsibility to collect the IDFA out of the PostHog SDK and into the client app, the AdSupport references are gone and the question is easily answered.
Where should the reviewer start?
It's a pretty small PR, but note that the PHGIDFA() function is gone and the caller of that function now checks for and calls a block provided as part of the SDK initialization.
How should this be manually tested?
With no changes to a client app, trigger an event, and verify that
$device_advertisingId
no longer has any value.Then modify the app to provide a block for
adSupportBlock
in the PostHog configuration. Triggering an event should now include the return value from this block as the value for$device_advertisingId
.Any background context you want to provide?
What are the relevant tickets?
#4 - Remove references to AdSupport framework
Screenshots or screencasts (if UI/UX change)
n/a
Questions:
enableAdvertisingCapturing
is no longer sufficient.